package com.pojo;
/**
 *
 **/

import com.alibaba.fastjson.JSON;
import org.apache.commons.beanutils.BeanUtils;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.lang.reflect.InvocationTargetException;

/**
 * @Author weiwei
 * @Date 2020-11-19 20:59
 * @description
 **/

@SpringBootTest
public class ParentAndChild {

    @Test
    public void test() throws InvocationTargetException, IllegalAccessException {
        Parent parent=new Parent();
        parent.setName("a");
        parent.setValue("a");
        Child child=new Child(parent);
        System.out.println(JSON.toJSONString(child));
    }
}
